---
layout: default
title: "404: Not Found"
---

<div class="container-fluid" style="margin-top:20px">
  <div class="container-fluid">
    <div class="row">
      <div class="well" style="background-color: #EEE">
        <div class="container-fluid">
          <div class="row">
            <div class="col-md-6">
              <img width=320 src="{{ '/assets/404_icon.png' | prepend: site.baseurl }}">
            </div>
            <div class="col-md-6">
              <h1>This isn't the page you're looking for...</h1>
              <h2>Move along.</h2>
            </div>
          </div>
        </div>
      </div>
      <div class="container-fluid">
        <div class="row">
          <div class="col-xs-offset-3 col-xs-6 text-center">
            Did you get here from a link on ROS Index?
          </div>
        </div>
        <div class="row">
          &nbsp;
        </div>
        <div class="row">
          <div class="col-xs-offset-3 col-xs-6 text-center">
            <a id="github_issue_link" target="_blank" href="" class="btn btn-sm btn-default btn-block">Report Broken Link</a>
          </div>
        </div>
        <div class="row">
          &nbsp;
        </div>
      </div>
    </div>
  </div>
</div>

<script>
  $(function () {
    function updateGitHref() {
      let githubLink = "https://github.com/ros-infrastructure/rosindex/issues/new?labels=bug&template=form404.yml";

      // Get current url
      var currentUrl = window.location.href;
      if (!currentUrl) {
        currentUrl = "";
      }

      // Get the url that brought us here
      var referrerUrl = document.referrer;
      if (!referrerUrl) {
        referrerUrl = "";
      }

      // Encode the urls
      var title = "title=Broken+Link:" + encodeURIComponent(currentUrl);
      var currentUrl_encoded = "404page=" + encodeURIComponent(currentUrl);
      var referrerUrl_encoded = "referrer=" + encodeURIComponent(referrerUrl);

      // Update the href
      githubLink += "&" + title + "&" + currentUrl_encoded + "&" + referrerUrl_encoded;

      // Set the href
      var githubIssueLink = $("#github_issue_link");
      if (!githubIssueLink.length) {
        console.error("Github issue link element is not available");
        return;
      }
      githubIssueLink.attr("href", githubLink);
    }

    // Update the href
    updateGitHref();

  });
</script>
